<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArLMS2xxPacketReceiver Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArLMS2xxPacketReceiver.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArLMS2xxPacketReceiver-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArLMS2xxPacketReceiver Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Given a device connection it receives packets from the sick through it.  
 <a href="classArLMS2xxPacketReceiver.html#details">More...</a></p>

<p><code>#include &lt;ArLMS2xxPacketReceiver.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0b9f745f9b5a4b738d984f0d452932a2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0b9f745f9b5a4b738d984f0d452932a2"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLMS2xxPacketReceiver.html#a0b9f745f9b5a4b738d984f0d452932a2">ArLMS2xxPacketReceiver</a> (unsigned char receivingAddress=0, bool allocatePackets=false, bool useBase0Address=false)</td></tr>
<tr class="memdesc:a0b9f745f9b5a4b738d984f0d452932a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor without an already assigned device connection. <br /></td></tr>
<tr class="separator:a0b9f745f9b5a4b738d984f0d452932a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fc9d9985edbcfc7c750b52c1769a7a5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0fc9d9985edbcfc7c750b52c1769a7a5"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLMS2xxPacketReceiver.html#a0fc9d9985edbcfc7c750b52c1769a7a5">ArLMS2xxPacketReceiver</a> (<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *deviceConnection, unsigned char receivingAddress=0, bool allocatePackets=false, bool useBase0Address=false)</td></tr>
<tr class="memdesc:a0fc9d9985edbcfc7c750b52c1769a7a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor with assignment of a device connection. <br /></td></tr>
<tr class="separator:a0fc9d9985edbcfc7c750b52c1769a7a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af274a7df9a84e51241eb8afb8d5216b0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af274a7df9a84e51241eb8afb8d5216b0"></a>
<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLMS2xxPacketReceiver.html#af274a7df9a84e51241eb8afb8d5216b0">getDeviceConnection</a> (void)</td></tr>
<tr class="memdesc:af274a7df9a84e51241eb8afb8d5216b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the device this instance receives packets from. <br /></td></tr>
<tr class="separator:af274a7df9a84e51241eb8afb8d5216b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c0a0f317997d36722ea589a95e0c8f9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c0a0f317997d36722ea589a95e0c8f9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLMS2xxPacketReceiver.html#a1c0a0f317997d36722ea589a95e0c8f9">isAllocatingPackets</a> (void)</td></tr>
<tr class="memdesc:a1c0a0f317997d36722ea589a95e0c8f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets whether or not the receiver is allocating packets. <br /></td></tr>
<tr class="separator:a1c0a0f317997d36722ea589a95e0c8f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab57e0f8cbb7867a52a7032ed513719c9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArLMS2xxPacket.html">ArLMS2xxPacket</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLMS2xxPacketReceiver.html#ab57e0f8cbb7867a52a7032ed513719c9">receivePacket</a> (unsigned int msWait=0)</td></tr>
<tr class="memdesc:ab57e0f8cbb7867a52a7032ed513719c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receives a packet from the robot if there is one available.  <a href="#ab57e0f8cbb7867a52a7032ed513719c9">More...</a><br /></td></tr>
<tr class="separator:ab57e0f8cbb7867a52a7032ed513719c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a055f6c6dc99f85cd9f63b45964bfc4b6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a055f6c6dc99f85cd9f63b45964bfc4b6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLMS2xxPacketReceiver.html#a055f6c6dc99f85cd9f63b45964bfc4b6">setDeviceConnection</a> (<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *deviceConnection)</td></tr>
<tr class="memdesc:a055f6c6dc99f85cd9f63b45964bfc4b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the device this instance receives packets from. <br /></td></tr>
<tr class="separator:a055f6c6dc99f85cd9f63b45964bfc4b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e5efa967fc165efef52ea5f8216000a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1e5efa967fc165efef52ea5f8216000a"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArLMS2xxPacketReceiver.html#a1e5efa967fc165efef52ea5f8216000a">~ArLMS2xxPacketReceiver</a> ()</td></tr>
<tr class="memdesc:a1e5efa967fc165efef52ea5f8216000a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a1e5efa967fc165efef52ea5f8216000a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr class="memitem:a4172fce9866172a5cc1611a4f00e910b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4172fce9866172a5cc1611a4f00e910b"></a>enum &#160;</td><td class="memItemRight" valign="bottom">{ <b>STATE_START</b>, 
<b>STATE_ADDR</b>, 
<b>STATE_START_COUNT</b>, 
<b>STATE_ACQUIRE_DATA</b>
 }</td></tr>
<tr class="separator:a4172fce9866172a5cc1611a4f00e910b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a05a88a3b90512aa63f3e2f85f9fa7047"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05a88a3b90512aa63f3e2f85f9fa7047"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myAllocatePackets</b></td></tr>
<tr class="separator:a05a88a3b90512aa63f3e2f85f9fa7047"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a801173719db6c9737c8305db4978ffe4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a801173719db6c9737c8305db4978ffe4"></a>
<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myDeviceConn</b></td></tr>
<tr class="separator:a801173719db6c9737c8305db4978ffe4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7afff857fcab4b6d500e4440fc76c39e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7afff857fcab4b6d500e4440fc76c39e"></a>
<a class="el" href="classArLMS2xxPacket.html">ArLMS2xxPacket</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myPacket</b></td></tr>
<tr class="separator:a7afff857fcab4b6d500e4440fc76c39e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a721590ea89c5c083d89d6c940dd2c3ce"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a721590ea89c5c083d89d6c940dd2c3ce"></a>
unsigned char&#160;</td><td class="memItemRight" valign="bottom"><b>myReceivingAddress</b></td></tr>
<tr class="separator:a721590ea89c5c083d89d6c940dd2c3ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac58e94692b67ed31c02766708f3e2631"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac58e94692b67ed31c02766708f3e2631"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myUseBase0Address</b></td></tr>
<tr class="separator:ac58e94692b67ed31c02766708f3e2631"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Given a device connection it receives packets from the sick through it. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ab57e0f8cbb7867a52a7032ed513719c9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArLMS2xxPacket.html">ArLMS2xxPacket</a> * ArLMS2xxPacketReceiver::receivePacket </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>msWait</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Receives a packet from the robot if there is one available. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msWait</td><td>how long to block for the start of a packet, nonblocking if 0 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NULL if there are no packets in alloted time, otherwise a pointer to the packet received, if allocatePackets is true than the place that called this function owns the packet and should delete the packet when done... if allocatePackets is false then nothing must store a pointer to this packet, the packet must be used and done with by the time this method is called again </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArLMS2xxPacketReceiver.h</li>
<li>ArLMS2xxPacketReceiver.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArLMS2xxPacketReceiver.html">ArLMS2xxPacketReceiver</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
